package com.andfo.testframework;

import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.ElementType;
import java.lang.annotation.RetentionPolicy;

/**
 * User: andfo
 * Date: Jul 13, 2009
 *
 * Used to declare a dependency on another test
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DependsOnTest {
    /**
     * The test class that has the dependency. If no Class is specified, it's assumed to be the current class.
     * @return The dependent test class.
     */
    Class testClass() default Class.class;

    /**
     * The test method to run.
     * @return A string with the name of the method.
     */
    String testMethod();
}
